function sendAjax({type="get",url,data=null,dataType="json"}){
    return new Promise((resolve,reject)=>{
        $.ajax({
            type,
            url,
            data,
            dataType,
            success: function (response) {
                
                resolve(response);
            },
            error(err){
                reject(err);
            }
        });
    })

}